<!-- eslint-disable vue/no-deprecated-slot-attribute -->
<template>
  <div>
    原生的demo
    <my-count :msg="msg" @sendMsg="printMsg">
      <div slot="customContent" style="font-weight: bold">父组件传入的插槽</div>
    </my-count>
  </div>
</template>
<script setup>
import { register } from "../../components/MyCount/index";
register("my-count"); // 自定义标签取名为my-count

const printMsg = (event) => {
  console.log("父组件收到的消息", event);
};
const msg = ref("我是第一条消息");
setTimeout(() => {
  msg.value = "我是第二条消息"; // 3s后更改msg的值
}, 3000);
</script>

<style lang="less" scoped></style>
